﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="http://127.0.0.1:8081/css/style.css" />
	<!--[if IE 6]>
	<script src="http://127.0.0.1:8081/js/iepng.js" type="text/javascript"></script>
	<script type="text/javascript" src="http://127.0.0.1:8081/js/function-manage.js"></script>
	<script type="text/javascript">
		EvPNG.fix('div, ul, img, li, input, a');
	</script>
	<![endif]-->

	<script type="text/javascript" src="http://127.0.0.1:8081/js/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="http://127.0.0.1:8081/js/menu.js"></script>

	<script type="text/javascript" src="http://127.0.0.1:8081/js/select.js"></script>
	<script type="text/javascript">
        function ClickToAppear() {
            var a=jQuery("#parentId0").val();
            //alert(a)

            if(a==2){
                jQuery("#parentId1").show();
                jQuery("#parentId2").hide();
                jQuery("#parentId3").hide();
            }
            if(a==3){
                jQuery("#parentId1").show();
                jQuery("#parentId2").show();
            }
            if(a==1){
                jQuery("#parentId1").hide();
                jQuery("#parentId2").hide();
                jQuery("#parentId3").hide();
            }
        }

		jQuery(function () {
            jQuery("#no1id").change(function () {
                var no1id = jQuery(this).val();
                var no2 =  jQuery("#"+no1id+"").html();
                jQuery("#charu").html(no2);
            })


        })

	</script>

	<title>添加分类</title>
</head>
<body>
<!--Begin Header Begin-->
<div class="soubg">
	<div class="sou">
		<!--Begin 所在收货地区 Begin-->
		<span class="s_city_b">
        	<span class="fl">送货至：</span>
            <span class="s_city">
            	<span>四川</span>
                <div class="s_city_bg">
                	<div class="s_city_t"></div>
                    <div class="s_city_c">
                    	<h2>请选择所在的收货地区</h2>
                        <table border="0" class="c_tab" style="width:235px; margin-top:10px;" cellspacing="0" cellpadding="0">
                          <tr>
                            <th>A</th>
                            <td class="c_h"><span>安徽</span><span>澳门</span></td>
                          </tr>
                          <tr>
                            <th>B</th>
                            <td class="c_h"><span>北京</span></td>
                          </tr>
                          <tr>
                            <th>C</th>
                            <td class="c_h"><span>重庆</span></td>
                          </tr>
                          <tr>
                            <th>F</th>
                            <td class="c_h"><span>福建</span></td>
                          </tr>
                          <tr>
                            <th>G</th>
                            <td class="c_h"><span>广东</span><span>广西</span><span>贵州</span><span>甘肃</span></td>
                          </tr>
                          <tr>
                            <th>H</th>
                            <td class="c_h"><span>河北</span><span>河南</span><span>黑龙江</span><span>海南</span><span>湖北</span><span>湖南</span></td>
                          </tr>
                          <tr>
                            <th>J</th>
                            <td class="c_h"><span>江苏</span><span>吉林</span><span>江西</span></td>
                          </tr>
                          <tr>
                            <th>L</th>
                            <td class="c_h"><span>辽宁</span></td>
                          </tr>
                          <tr>
                            <th>N</th>
                            <td class="c_h"><span>内蒙古</span><span>宁夏</span></td>
                          </tr>
                          <tr>
                            <th>Q</th>
                            <td class="c_h"><span>青海</span></td>
                          </tr>
                          <tr>
                            <th>S</th>
                            <td class="c_h"><span>上海</span><span>山东</span><span>山西</span><span class="c_check">四川</span><span>陕西</span></td>
                          </tr>
                          <tr>
                            <th>T</th>
                            <td class="c_h"><span>台湾</span><span>天津</span></td>
                          </tr>
                          <tr>
                            <th>X</th>
                            <td class="c_h"><span>西藏</span><span>香港</span><span>新疆</span></td>
                          </tr>
                          <tr>
                            <th>Y</th>
                            <td class="c_h"><span>云南</span></td>
                          </tr>
                          <tr>
                            <th>Z</th>
                            <td class="c_h"><span>浙江</span></td>
                          </tr>
                        </table>
                    </div>
                </div>
            </span>
        </span>
		<!--End 所在收货地区 End-->
		<span class="fr" th:if="${session.user.loginName!=null}">
        	<span class="fl"><a href="userInfo" th:text="${session.user.userName}">用户名</a>&nbsp;|&nbsp;<a href="OrderShowAll">我的订单</a>&nbsp;|&nbsp;<a href="goindex" th:hidden="${session.user.getType()==1?false:true}">后台管理&nbsp;|&nbsp;</a><a href="exit.action">注销</a></span>
        </span>
		<span class="fr" th:if="${session.user.loginName==null}">
            <span class="fl">你好，请<a href="gologin"  style="color:#ff4e00;">登录</a>&nbsp;<a href="goRegist" style="color:#ff4e00;">免费注册</a>&nbsp;&nbsp;</span>
        </span>
	</div>
</div>
<div class="top">
	<div class="m_logo">
		<a href="indexShow"><img src="http://127.0.0.1:8070/logo.png" /></a>
	</div>
</div>
<!--End Header End-->
<div class="i_bg bg_color">
	<!--Begin 用户中心 Begin -->
	<div class="m_content">

		<div class="m_left">
			<div class="left_n">管理中心</div>
			<div class="left_m">
				<div class="left_m_t t_bg1">订单中心</div>
				<ul><li><a href="OrderShowAll">我的订单</a></li></ul>
				<ul><li><a href="queryorder" th:hidden="${session.user.getType()==1?false:true}">全部订单</a></li></ul>
			</div>
			<div class="left_m">
				<div class="left_m_t t_bg2">会员中心</div>
				<ul>
					<li><a th:href="userInfo">用户信息</a></li>
					<li><a href="showUsers" th:hidden="${session.user.getType()==1?false:true}">用户列表</a></li>
				</ul>
			</div>
			<div class="left_m" th:hidden="${session.user.getType()==1?false:true}">
				<div class="left_m_t t_bg3">商品管理</div>
				<ul>
					<li><a href="Allproductcategory">分类管理</a></li>
					<li><a href="Alleasybuy_product">商品管理</a></li>
					<li><a href="ShowAllOne">商品上架</a></li>
				</ul>
			</div>
			<div class="left_m">
				<div class="left_m_t t_bg4">质询中心</div>
				<ul>
					<li><a href="newsShow">质询列表</a></li>
				</ul>
			</div>
		</div>
		<div class="m_right">
			<div class="mem_tit">添加分类</div>
			<div class="m_des">
			<form action="addproductcategory" METHOD="post">
				<table class="form">
					<tr>
						<td class="field">请选择添加的分类级别：</td>
						<td>
							<select name="type" onchange="ClickToAppear()" id="parentId0">
								<option value="1">一级分类</option>
								<option value="2">二级分类</option>
								<option value="3">三级分类</option>
							</select>
						</td>
					</tr>
					<tr style="display:none" id="parentId1" >
						<td class="field">一级分类：</td>
						<td>
							<select id="no1id" name="class1">
								<option  value="">--请选择--</option>
								<option th:each="map:${maps}" th:if="${map.get('type') eq 1}" th:value="${map.get('id')}" th:text="${map.get('name')}"></option>

							</select>
						</td>

						<div style="display:none" >
							<div th:id="${map1.get('id')}" th:each="map1:${maps}" th:if="${map1.get('type') eq 1}" th:value="${map1.get('id')}"> //一级分类：

								<option  th:each="map2:${maps}" th:if="${map2.get('parentId') eq map1.get('id')}" th:value="${map2.get('id')}" th:text="${map2.get('name')}">--请选择--</option>
								//用第一次查到的id做父id，查询
							</div>
						</div>
					</tr>
					<tr style="display:none" id="parentId2">
						<td class="field">二级分类：</td>
						<td><select name="class2" id="charu"></select></td>
					</tr>
					<tr>
						<td class="field">分类名称：</td>
						<td><input type="text" class="text" name="name" required/></td>
					</tr>
					<tr>
						<td></td>
						<td><label class="ui-blue"><input type="submit" name="submit" value="更新" required/></label></td>
					</tr>
				</table>
			</form>
			</div>
		</div>
</div>



		<div class="b_btm_bg b_btm_c">
			<div class="b_btm">
				<table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
					<tr>
						<td width="72"><img src="http://127.0.0.1:8070/b1.png" width="62" height="62" /></td>
						<td><h2>正品保障</h2>正品行货  放心购买</td>
					</tr>
				</table>
				<table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
					<tr>
						<td width="72"><img src="http://127.0.0.1:8070/b2.png" width="62" height="62" /></td>
						<td><h2>满38包邮</h2>满38包邮 免运费</td>
					</tr>
				</table>
				<table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
					<tr>
						<td width="72"><img src="http://127.0.0.1:8070/b3.png" width="62" height="62" /></td>
						<td><h2>天天低价</h2>天天低价 畅选无忧</td>
					</tr>
				</table>
				<table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
					<tr>
						<td width="72"><img src="http://127.0.0.1:8070/b4.png" width="62" height="62" /></td>
						<td><h2>准时送达</h2>收货时间由你做主</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="b_nav">
			<dl>
				<dt><a href="#">新手上路</a></dt>
				<dd><a href="#">售后流程</a></dd>
				<dd><a href="#">购物流程</a></dd>
				<dd><a href="#">订购方式</a></dd>
				<dd><a href="#">隐私声明</a></dd>
				<dd><a href="#">推荐分享说明</a></dd>
			</dl>
			<dl>
				<dt><a href="#">配送与支付</a></dt>
				<dd><a href="#">货到付款区域</a></dd>
				<dd><a href="#">配送支付查询</a></dd>
				<dd><a href="#">支付方式说明</a></dd>
			</dl>
			<dl>
				<dt><a href="#">会员中心</a></dt>
				<dd><a href="#">资金管理</a></dd>
				<dd><a href="#">我的收藏</a></dd>
				<dd><a href="#">我的订单</a></dd>
			</dl>
			<dl>
				<dt><a href="#">服务保证</a></dt>
				<dd><a href="#">退换货原则</a></dd>
				<dd><a href="#">售后服务保证</a></dd>
				<dd><a href="#">产品质量保证</a></dd>
			</dl>
			<dl>
				<dt><a href="#">联系我们</a></dt>
				<dd><a href="#">网站故障报告</a></dd>
				<dd><a href="#">购物咨询</a></dd>
				<dd><a href="#">投诉与建议</a></dd>
			</dl>
			<div class="b_tel_bg">
				<a href="#" class="b_sh1">新浪微博</a>
				<a href="#" class="b_sh2">腾讯微博</a>
				<p>
					服务热线：<br />
					<span>400-123-4567</span>
				</p>
			</div>
			<div class="b_er">
				<div class="b_er_c"><img src="http://127.0.0.1:8070/er.gif" width="118" height="118" /></div>
				<img src="http://127.0.0.1:8070/ss.png" />
			</div>
		</div>
		<div class="btmbg">
			<div class="btm">
				备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com   Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 , Technical Support: Dgg Group <br />
				<img src="http://127.0.0.1:8070/b_1.gif" width="98" height="33" />
				<img src="http://127.0.0.1:8070/b_2.gif" width="98" height="33" />
				<img src="http://127.0.0.1:8070/b_3.gif" width="98" height="33" />
				<img src="http://127.0.0.1:8070/b_4.gif" width="98" height="33" />
				<img src="http://127.0.0.1:8070/b_5.gif" width="98" height="33" />
				<img src="http://127.0.0.1:8070/b_6.gif" width="98" height="33" />
			</div>
		</div>
		<!--End Footer End -->
	</div>

</body>
</html>
